package com.xsq.wifi.model;

/**
 * 编写人：李振德
 * 创建时间：2025/5/13
 */
import android.os.Parcel;
import android.os.Parcelable;

public class WifiListModel implements Parcelable {
    private String bssid;
    private int rssi;

    // 构造方法
    public WifiListModel(String bssid, int rssi) {
        this.bssid = bssid;
        this.rssi = rssi;
    }

    // Parcelable 实现
    protected WifiListModel(Parcel in) {
        bssid = in.readString();
        rssi = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(bssid);
        dest.writeInt(rssi);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<WifiListModel> CREATOR = new Creator<WifiListModel>() {
        @Override
        public WifiListModel createFromParcel(Parcel in) {
            return new WifiListModel(in);
        }

        @Override
        public WifiListModel[] newArray(int size) {
            return new WifiListModel[size];
        }
    };

    // Getter 和 Setter
    public String getBssid() {
        return bssid;
    }

    public void setBssid(String bssid) {
        this.bssid = bssid;
    }

    public int getRssi() {
        return rssi;
    }

    public void setRssi(int rssi) {
        this.rssi = rssi;
    }
}
